package com.hd.trans.network.bean.trans;

public class UploadTaskReq {
    //参数(必须): fromLang 源语言
    private String fromLang;
    //参数(必须): toLang 目标语言
    private String toLang;
    //参数(必须): taskId 任务ID, 由/task_create获取
    private String taskId;
    //参数(必须): fileName 文件名
    private String fileName;
    //参数(必须): isBigFile 是否为大文件，默认为false。
    private boolean isBigFile;
    //参数(可选): data 小文件的完整数据,base64格式。当isBigFile参数为false或没有isBigFile参数时，此参数为必须参数。当isBigFile为true时，不需要此参数。
    private String data;

    public String getFromLang() {
        return fromLang;
    }

    public void setFromLang(String fromLang) {
        this.fromLang = fromLang;
    }

    public String getToLang() {
        return toLang;
    }

    public void setToLang(String toLang) {
        this.toLang = toLang;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public boolean isBigFile() {
        return isBigFile;
    }

    public void setBigFile(boolean bigFile) {
        isBigFile = bigFile;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public static final class Builder{
        private String fromLang;
        private String toLang;
        private String taskId;
        private String fileName;
        private String data;
        private boolean isBigFile;
        private UploadTaskReq uploadTaskReq;

        public Builder() {

        }

        public UploadTaskReq build(){
            uploadTaskReq = new UploadTaskReq();
            uploadTaskReq.setFromLang(fromLang);
            uploadTaskReq.setToLang(toLang);
            uploadTaskReq.setTaskId(taskId);
            uploadTaskReq.setFileName(fileName);
            uploadTaskReq.setData(data);
            uploadTaskReq.setBigFile(isBigFile);
            return uploadTaskReq;
        }

        public Builder setFromLang(String fromLang) {
            this.fromLang = fromLang;
            return this;
        }

        public Builder setToLang(String toLang) {
            this.toLang = toLang;
            return this;
        }

        public Builder setTaskId(String taskId) {
            this.taskId = taskId;
            return this;
        }

        public Builder setFileName(String fileName) {
            this.fileName = fileName;
            return this;
        }

        public Builder setBigFile(boolean bigFile) {
            isBigFile = bigFile;
            return this;
        }

        public Builder setData(String data) {
            this.data = data;
            return this;
        }

    }
}
